package control;


import entity.Admin;
import dao.AdminDAO;
import entity.Customer;
import flex.messaging.FlexContext;


public class AdminControl {
	public Customer getAdminInfo(String username){//notify this return type, here it borrows customer
		//get userid from session
		System.out.println("getAdminInfo");
		AdminDAO AdminDao = new AdminDAO();
		String userid = (String) FlexContext.getFlexSession().getAttribute(username);
		//Admin a = 
		//System.out.println("return to flex: "+a.getAdminID() + a.getAdminPW());
		return AdminDao.getOneAdmin(userid);
	}
}
